package com.design.yjx.proxy.remote;

import java.io.Serializable;

/**
 * @author yuanjianxin
 * @date 2017/8/23 16:27
 */
public class NoQuarterState implements State,Serializable {

    private transient GumballMachine gumballMachine;

    public NoQuarterState(GumballMachine gumballMachine) {
        this.gumballMachine = gumballMachine;
    }

    @Override
    public void insertQuarter() {
        System.out.println("投入钱");
        gumballMachine.setState(gumballMachine.getHasQuarterState());
    }
}
